#include <iostream>

using namespace std;
#define int long long
const int N = 1010;
int n , m ,c;
int f[N][N];
signed main()
{
    cin >> n >> m >> c;
    for(int i = 1;i <= n;i ++)
        for(int j = 1;j <= m;j ++)
            cin >> f[i][j];

    for(int i = 1;i <= n;i ++)
        for(int j = 1;j <= m;j ++)
            f[i][j] += f[i-1][j] + f[i][j-1] - f[i-1][j-1];

    int ret = -1e18;
    int x , y;
    for(int x1 = 1;x1 <= n - c + 1;x1 ++)
    {
        for(int y1 = 1;y1 <= m - c + 1;y1 ++)
        {
            int x2 = x1 + c - 1 , y2 = y1 + c - 1;
            int t = f[x2][y2] - f[x2][y1-1] - f[x1-1][y2] + f[x1-1][y1-1];
            if(t > ret)
            {
                ret = t;
                x = x1;
                y = y1;
            }
        }
    }
    cout << x << " " << y << endl;
    return 0;
}